package cn.edu.swu.wwy;

public class Course {

    private String courseId;

    private String courseName;

    private String teacher;

    //无参构造方法
    public Course() {}
    //带参构造方法 (初始化所有属性)
    public Course(String courseId, String courseName, String teacher) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacher = teacher;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    //打印输出该课程的所有信息
    public void showInfo() {
        System.out.println("课程编号：" + courseId + "\n课程名称：" + courseName + "\n任课教师：" + teacher);
    }
}
